package rexsee.core.browser.clazz;

import java.util.ArrayList;

public class DestroyListeners {
	private final ArrayList<Runnable> listeners;
	public DestroyListeners() {
		listeners = new ArrayList<Runnable>();
	}
	public void add(Runnable listner) {
		listeners.add(listner);
	}
	public void clear() {
		listeners.clear();
	}
	public void run() {
		for (int i = 0; i < listeners.size(); i++) {
			try {
				listeners.get(i).run();
			} catch (Exception e) {
			}
		}
	}
}
